<template>
  <div class="layout-self">
    <main-header />
    <div class="main-center">
      <div class="author-container">
        <user-panel :target-user-id="userData && userData.userId" :page="'self'" />
      </div>
      <nuxt class="user-container" />
    </div>
    <main-footer />
  </div>
</template>
<script>
import MainHeader from '~/components/public/MainHeader.vue'
import MainFooter from '~/components/public/MainFooter.vue'
import UserPanel from '~/components/public/UserPanel.vue'

export default {
  components: {
    MainHeader,
    MainFooter,
    UserPanel
  },
  computed: {
    userData() {
      return this.$store.state.user.userData
    }
  }
}
</script>
<style scoped lang="scss">
@import "../assets/css/public";

.layout-self {
  min-height: 100vh;

  .main-center {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    .author-container {
      box-sizing: border-box;
      border: 1px solid $theme-color-border;
      overflow: hidden;
      width: 260px;
    }
    .user-container {
      box-sizing: border-box;
      overflow: hidden;
      width: 928px;
      min-height: 100vh;
      background: #fff;
      padding: 0 0 15px;
      border: 1px solid $theme-color-border;
    }
  }
}
</style>
